import socket

client=socket.socket()
ip_port=('127.0.0.1',9999)
client.connect(ip_port)
with open('tcp2_server.py','rb') as f:
    for i in f:
        client.send(i)
        data=client.recv(1024)
        if data != b'success':
            break
client.send('quit'.encode(encoding='utf-8'))
